package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

import java.util.Objects;

/**
    * @description: 合同比对套餐
    * @author zhushuainan
    * @date 2022/12/06 10:11:13
    */
@Getter
public enum ContractComparePackageEnum {
//    FIRST_TASTE_PACKAGE("初尝包","enum.contractComparePackage.memo.first_taste_package"),
    BASE_PACKAGE("合同比对基础包","enum.contractComparePackage.memo.base_package"),
    ADVANCE_PACKAGE("合同比对进阶包","enum.contractComparePackage.memo.advance_package"),
    SENIOR_PACKAGE("合同比对高级包","enum.contractComparePackage.memo.senior_package"),
    EXCLUSIVE_PACKAGE("合同比对尊享包","enum.contractComparePackage.memo.exclusive_package"),
    ;


;
    /**
     * 套餐名称
     */
    private String feeName;
    /**
     * 描述
     */
    private String memo;

    ContractComparePackageEnum(String feeName, String memo) {
        this.feeName = feeName;
        this.memo = memo;
    }

    public static ContractComparePackageEnum getFeeTypeByFeeName(String feeName){
        for (ContractComparePackageEnum contractComparePackageEnum : values()){
            if (Objects.equals(contractComparePackageEnum.getFeeName(), feeName)){
                return contractComparePackageEnum;
            }
        }
        return null;
    }

    public String getMemo() {
        return I18nMessageUtil.getMessage(memo);
    }
}
